<?php

require_once('CircuitBreaker.php');


$cb = new CircuitBreaker('myapp');
$cb->logging = true;

if($cb->isClosed()) {
	if(!$res = @file_get_contents("http://litfuel.net/tutorials/testserver.php")) {
		$cb->fail();
	} else {
		$cb->success();
	}
	var_dump($res);
} else {
	echo 'CIRCUIT TRIPPED! NO CALLS MADE';
	return false;
}



?>